package san.service.m;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.Page;

import san.dao.m.VarietyDao;
import san.entity.m.Variety;
@Service
@Transactional
public class VarietyService{
	/**
	 * 自动生成VarietyService类.
	 */
	private static final long serialVersionUID = 4076002265548603825L;
	@Autowired
	private VarietyDao varietyDao;
	
	@Transactional(readOnly = true)
	public Page<Variety> getAll(Page<Variety> page) throws Exception {
		return varietyDao.getAll(page);
	}

	@Transactional(readOnly = true)
	public List<Variety> getAll() throws Exception {
		return varietyDao.getAll();
	}
	
	@Transactional(readOnly = true)
	public Variety get(String id) throws Exception {
		return varietyDao.get(id);
	}

	public void save(Variety variety) throws Exception {
		varietyDao.save(variety);
	}

	public void delete(String id) throws Exception {
		varietyDao.delete(id);
	}

}
